//
//  NrowLabelViewCell.m
//  DevicePrepaireReport
//
//  Created by MacBook Pro on 16/7/21.
//  Copyright © 2016年 guotongbo. All rights reserved.
//

#import "NrowLabelViewCell.h"
#import "NrowLabelMessage.h"
#import "DevicePrepaireReportViewController.h"
#import "DevicePrepaireReportTwoViewController.h"
@implementation NrowLabelViewCell
/**信息标题*/
@synthesize infoLabel;
@synthesize infoTextField;
+ (instancetype)NrowLabelMessageViewWithTableView:(UITableView *)tableView{
    
    static NSString *cellID = @"NrowLabelMessageCell";
    NrowLabelViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    
    if (cell == nil) {
        
        cell = [[[NSBundle mainBundle] loadNibNamed:@"NrowLabelViewCell" owner:nil options:nil] lastObject];
        
    }
    return cell;

}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(IBAction)change:(id)sender{
    if (self.indexPath.section == 0) {
        if (self.indexPath.row == 0) {
            self.parentController.nLM.customerName = infoTextField.text;
            self.parentTwoController.currentServeReprot.customerName = infoTextField.text;
        }else if (self.indexPath.row == 1){
            self.parentController.nLM.operatorStr = infoTextField.text;
            self.parentTwoController.currentServeReprot.department = infoTextField.text;
        }else if (self.indexPath.row == 2){
            self.parentController.nLM.department = infoTextField.text;
            self.parentTwoController.currentServeReprot.department = infoTextField.text;
        }else if (self.indexPath.row == 3){
            self.parentController.nLM.contactAddress = infoTextField.text;
        }else if (self.indexPath.row == 4){
            self.parentController.nLM.departLeader = infoTextField.text;
        }else if (self.indexPath.row == 5){
            self.parentController.nLM.departTel = infoTextField.text;
            self.parentTwoController.currentServeReprot.departTel = infoTextField.text;
        }else if (self.indexPath.row == 7){
            self.parentController.nLM.eqType = infoTextField.text;
        }else if (self.indexPath.row == 8){
            self.parentController.nLM.eqSeq = infoTextField.text;
        }
//else if (self.indexPath.row == 6){
//            self.parentController.nLM.eqStyle = infoTextField.text;
            }
}

//-(void)setNrowLabelMessage:(NrowLabelMessage *)NrowLabelMessage{
//    infoLabel.text = NrowLabelMessage.info;
//}

@end
